<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>织蝶云 - OA+PM+CRM一站式企业应用管理平台</title>

    <!-- 小图标 -->
    <link rel="shortcut icon" href="./images/favicon/favicon.ico" type="image/x-icon">
    <!-- 清除样式 -->
    <link rel="stylesheet" href="./css/resets.css">
    <!-- bootstrap的css包 -->
    <link rel="stylesheet" href="./lib/bootstrap_4/css/bootstrap.min.css">
    <!-- 模板样式css -->
    <link rel="stylesheet" href="./css/lcs_resume.css">
    <!-- 清除样式 -->
    <link rel="stylesheet" href="./css/resets.css">
    <!-- 引入字体图标css -->
    <link rel="stylesheet" href="./css/iconfont/lyd_approval/iconfont.css">
    <!--  -->
    <link rel="stylesheet" href="./css/iconfont/lcs_resume/iconfont.css">
</head>

<body>
    <div class="left_nav">
        <div class="logo">
            <a href="/tmeplate">
                <img src="./images/lyd/lyd_approval_frame_logo-left.png" alt="织蝶云">
            </a>
        </div>
        <div class="left_nav_menu">
            <ul class="left_nav_menu_nav">
                <li class="btn-block">
                    <a href="/page">
                        <i class="iconfont icon-home"></i>
                        <span>主页</span>
                    </a>
                </li>
                <li class="btn-block">
                    <a href="/mange">
                        <i class="iconfont icon-list"></i>
                        <span>项目</span>
                    </a>
                </li>
                <li class="btn-block">
                    <a href="/lyd_approval">
                        <i class="iconfont icon-suitcase"></i>
                        <span>审批</span>
                    </a>
                </li>
                <li class="btn-block">
                    <a href="/gy-CRM">
                        <i class="iconfont icon-users"></i>
                        <span>CRM</span>
                    </a>
                </li>
                <li class="btn-block">
                    <a href="javascript:;">
                        <i class="iconfont icon-calendar"></i>
                        <span>日程</span>
                    </a>
                </li>
                <li class="btn-block">
                    <a href="javascript:;">
                        <i class="iconfont icon-tasks"></i>
                        <span>报告</span>
                    </a>
                </li>
                <li class="btn-block">
                    <a href="/lyj_knowledge">
                        <i class="iconfont icon-book"></i>
                        <span>知识</span>
                    </a>
                </li>
                <li class="btn-block">
                    <a href="/document">
                        <i class="iconfont icon-columns"></i>
                        <span>文档</span>
                    </a>
                </li>
                <li class="btn-block">
                    <a href="/resume">
                        <i class="iconfont icon-male"></i>
                        <span>简历</span>
                    </a>
                </li>
                <li class="btn-block">
                    <a href="javascript:;">
                        <i class="iconfont icon-tupian"></i>
                        <span>相册</span>
                    </a>
                </li>
                <li class="btn-block">
                    <a href="javascript:;">
                        <i class="iconfont icon-bull-horn-announcer"></i>
                        <span>公告</span>
                    </a>
                </li>
                <li class="btn-block">
                    <a href="javascript:;">
                        <i class="iconfont icon-gavel"></i>
                        <span>考勤</span>
                    </a>
                </li>
                <li class="btn-block">
                    <a href="/yyl_system">
                        <i class="iconfont icon-cogs"></i>
                        <span>系统</span>
                    </a>
                </li>
            </ul>
        </div>
    </div>
    <div class="top_nav_box">
        <div class="top_nav">
            <a class="toggle-btn">
                <i class="iconfont icon-bars"></i>
            </a>
            <div class="top_center">
                <a href="/resume" class="btn btn-all ">全部简历</a>
                <a href="/rudang" class="btn btn-all">入档</a>
                <a href="/mianshi" class="btn btn-all">通知面试</a>
                <a href="/luyong" class="btn btn-all actives">录用</a>
                <a href="/noluyong" class="btn btn-all">不录用</a>
                <a href="/weiyue" class="btn btn-all">违约</a>
            </div>
            <div class="top_right">
                <ul class="top_right_info">
                    <li>
                        <a href="javascript:;" class="btn info_icon">
                            <i class="iconfont icon-envelope-o"></i>
                        </a>
                        <!-- 管理内容 -->
                        <div class="nav_switch_off right_nav">
                            <h5>你有0条信息</h5>
                            <ul>
                                <li>目前还没有最新消息</li>
                                <li>
                                    <a href="javascript:;">查看更多</a>
                                </li>
                            </ul>
                        </div>
                    </li>
                    <li class="admi_btn">
                        <a href="javascript:;" class="admi">
                            <img src="./images/lyd/6.jpg" alt="管理员">
                            管理员
                            <span class="iconfont icon-caret-bottom"></span>
                        </a>
                        <ul class="nav_switch_no amid_menu nav_switch_off">
                            <li><a href="javascript:;"><i class="iconfont icon-user"></i>个人主页</a></li>
                            <li><a href="javascript:;"><i class="iconfont icon-cog"></i>基本资料</a></li>
                            <li><a href="javascript:;"><i class="iconfont icon-camera"></i>更换头像</a></li>
                            <li><a href="javascript:;"><i class="iconfont icon-cog"></i>更换密码</a></li>
                            <li><a href="javascript:;"><i class="iconfont icon-list"></i>我的任务</a></li>
                            <li><a href="javascript:;"><i class="iconfont icon-magnet"></i>升级为付费版</a></li>
                            <li><a href="javascript:;"><i class="iconfont icon-tasks"></i>订单</a></li>
                            <li><a href="javascript:;"><i class="iconfont icon-comments"></i>聊天</a></li>
                            <li><a href="/outlogin"><i class="iconfont icon-SignOut"></i>退出</a></li>
                        </ul>
                    </li>
                </ul>
            </div>
        </div>
        <div class="content-box">
            <div class="content">
                <div class="content_top clearfix">
                    <!-- 上面左边 -->
                    <a href="/resumeadd" class="btn_add btn btn-danger"><span class="iconfont icon-plus"></span>新建简历</a>
                    <!-- 上面右边 -->
                    <div class="content_top_right">
                        <select name="" id="xial">
                            <option value="">状态</option>
                            <option value="">入档</option>
                            <option value="">通知面试</option>
                            <option value="">录用</option>
                            <option value="">不录用</option>1
                        </select>

                        <input type="text" value="" placeholder="请输入姓名" class="input-ss input">
                        <button class="btn_cha"><span class="sx iconfont icon-sousuo"></span>筛选</button>
                    </div>
                </div>
                <div class="content_bottom">
                    <div class="content_bottom_a">
                        <table class="table table-bordered">
                            <thead class="thead-light">
                                <tr>
                                    <th scope="col">职位</th>
                                    <th scope="col">姓名</th>
                                    <th scope="col">性别</th>
                                    <th scope="col">手机</th>
                                    <th scope="col">生日</th>
                                    <th scope="col">学历</th>
                                    <th scope="col">经验</th>
                                    <th scope="col">状态</th>
                                    <th scope="col">操作</th>
                                </tr>
                            </thead>
                            <tbody>
                                <tr>
                                    <td class="left">公司经理</td>
                                    <td>王五</td>
                                    <td>男</td>
                                    <td>13265478963</td>
                                    <td>20010602</td>
                                    <td>博士</td>
                                    <td>三年</td>
                                    <td>
                                        <span class="luyong">录用</span>
                                    </td>
                                    <td>
                                        <div class="dropdown">
                                            <button class="btn btn-secondary btn-sm dropdown-toggle" type="button" id="dropdownMenuButton"
                                                data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
                                                操作
                                            </button>
                                            <div class="dropdown-menu" aria-labelledby="dropdownMenuButton">
                                                <a class="dropdown-item" href="./lcs_chaxun.html"><span class="iconfont icon-yanjing"></span>
                                                    &nbsp; 查看</a>
                                                <a class="dropdown-item" href="#"><span class="iconfont icon-bianji"></span>
                                                    &nbsp;编辑</a>
                                                <a class="dropdown-item" href="#"><span class="iconfont icon-shanchu"></span>
                                                    &nbsp;删除</a>
                                            </div>
                                        </div>
                                    </td>
                                </tr>
                                <tr>
                                    <td colspan="9" class="ll">暂时还没有面试简历存档</td>
                                </tr>
                            </tbody>
                        </table>
                        <div class="content_bottom_b">
                            <p>共
                                <%=strip%> 条</p>
                        </div>
                    </div>
                </div>
                <div class="bottom_a">
                    <p class="bottom_wenzi">
                        <i class="bottom_wen"> 2020 © by 织蝶云系统 · <i>
                                织蝶云手册 · 翌羽信息科技(上海)有限公司 版权所有
                    </p>
                </div>
            </div>

        </div>
    </div>

    <!-- 查询模板 -->
    <script type="text/template" id="usres_template">
        {{each list}}
        <tr>
            
            <td class="left">{{$value.job}}</td>
            <td>{{$value.name}}</td>
            <td>{{$value.phone}}</td>
            <td>{{$value.sex}}</td>
            <td>{{$value.birth}}</td>
            <td>{{$value.education}}</td>
            <td>{{$value.working}}</td>
            <td>
                <span class="luyong {{if $value.status == '入档'}} enter 
                {{else if $value.status == '通知面试'}} notice 
                {{else if $value.status == '录用'}} employment 
                {{else if $value.status == '不录用'}} no_employment 
                {{else if $value.status == '违约'}} default 
                {{/if}}">{{$value.status}}</span>
            </td>
            <td>
                <div class="dropdown">
                    <button class="btn btn-secondary btn-sm dropdown-toggle" type="button" id="dropdownMenuButton"
                        data-toggle="dropdown" >
                        操作
               </button>
                    <div class="dropdown-menu" >
                        <a class="btn_chakan dropdown-item" href="/chaxun?id={{$value.id}}" data-id="{{$value.id}}" ><span class="iconfont icon-yanjing"></span>
                            &nbsp; 查看</a>
                        <a class="btn_bianji dropdown-item" href="/resumemodify?id={{$value.id}}" data-id="{{$value.id}}"><span class="iconfont icon-bianji"></span>
                            &nbsp;编辑</a>
                        <a class="btn_delete dropdown-item" href="javascript:;" data-id="{{$value.id}}"><span class="iconfont icon-shanchu"></span>
                            &nbsp;删除</a>
                    </div>
                </div>
            </td>
        </tr>
        {{/each}}
    </script>
    <!-- 几条数据 -->
    <script type="text/template" id="po_template">
        <p>共
            {{strip}} 条</p>
    </script>
    <!-- 搜索模板 -->
    <script type="text/template" id="cerh_template">
            {{each list}}
            <tr>
                
                <td class="left">{{$value.job}}</td>
                <td>{{$value.name}}</td>
                <td>{{$value.phone}}</td>
                <td>{{$value.sex}}</td>
                <td>{{$value.birth}}</td>
                <td>{{$value.education}}</td>
                <td>{{$value.working}}</td>
                <td>
                    <span class="luyong {{if $value.status == '入档'}} enter 
                    {{else if $value.status == '通知面试'}} notice 
                    {{else if $value.status == '录用'}} employment 
                    {{else if $value.status == '不录用'}} no_employment 
                    {{else if $value.status == '违约'}} default 
                    {{/if}}">{{$value.status}}</span>
                </td>
                <td>
                    <div class="dropdown">
                        <button class="btn btn-secondary btn-sm dropdown-toggle" type="button" id="dropdownMenuButton"
                            data-toggle="dropdown" >
                            操作
                   </button>
                        <div class="dropdown-menu" >
                            <a class="btn_chakan dropdown-item" href="/chaxun?id={{$value.id}}" data-id="{{$value.id}}" ><span class="iconfont icon-yanjing"></span>
                                &nbsp; 查看</a>
                            <a class="btn_bianji dropdown-item" href="/resumemodify?id={{$value.id}}" data-id="{{$value.id}}"><span class="iconfont icon-bianji"></span>
                                &nbsp;编辑</a>
                            <a class="btn_delete dropdown-item" href="javascript:;" data-id="{{$value.id}}"><span class="iconfont icon-shanchu"></span>
                                &nbsp;删除</a>
                        </div>
                    </div>
                </td>
            </tr>
            {{/each}}
    </script>



    <!-- 引入jquery -->
    <script src="./lib/jquery/jquery.min.js"></script>
    <!-- 引入bootstrap的js -->
    <!-- 下拉列表建立在第三方库  使用前要放在bootstrap之前 -->
    <script src="./lib/bootstrap_4/js/bootstrap.bundle.min.js"></script>
    <script src="./lib/bootstrap_4/js/bootstrap.min.js"></script>
    <!-- 模板样式js -->
    <!-- 引入字体图标js -->
    <script src="./js/iconfont/lyd_approval/iconfont.js"></script>
    <!-- 模板样式js -->
    <script src="./js/template.js"></script>
    <script src="./lib/template/template-web.js"></script>
    <script>
        // 查询所有数据
        // 先声明一个函数
        let show = function () {
            // ajax
            $.ajax({
                type: 'get',
                url: '/luyongshow',
                data: '',
                success: function (data) {
                    // 判断有没有数据
                    if (data == '') {
                        // console.log(111);                       
                        $('tbody').html(`<tr> <td colspan="9" class="ll">暂时还没有面试简历存档</td></tr>`);

                    } else {
                        // 模板
                        let resumeid = template('usres_template', { list: data });
                        $('tbody').html(resumeid);
                    }
                }
            })
        }
        show();

        // 删除
        $('tbody').on('click', '.btn_delete', function () {
            // console.log(111);
            // 获取id属性
            let id = $(this).data('id');
            // ajax
            $.ajax({
                type: 'get',
                url: '/resumedelete',
                data: { id: id },
                beforeSend: function () {
                    let falg = confirm("您确定删除吗？");
                    if (!falg) {
                        return falg;
                    }
                },
                success: function (data) {
                    if (data.code == "1") {
                        show();
                        alert('删除成功')
                    }
                }
            })
        })

        // 搜索
        // 点击筛选按钮
        $('.btn_cha').on('click', function () {
            // console.log(111);
            // 获取表单input数据
            let emp = $.trim($('.input-ss').val());
            // console.log(emp);
            // ajax
            $.ajax({
                type: 'post',
                url: '/resumecerh',
                data: { emp: emp },
                success: function (data) {
                    let searchstr = template('cerh_template', { list: data });
                    $('tbody').html(searchstr);
                }
            })
            // 几条数据
            // ajax
            $.ajax({
                type: 'post',
                url: '/resumepo',
                data: { emp: emp },
                success: function (data) {
                    console.log(data);

                    let searchstr = template('po_template', data);
                    $('.content_bottom_b').html(searchstr);
                }
            })
        })

    </script>
</body>

</html>